/**
 * 
 */
package org.vsg.stock.basic.persistence;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.springframework.dao.DataAccessException;
import org.vsg.common.orm.hibernate.GenericDao;
import org.vsg.stock.basic.domain.StockPerformance;

/**
 * @author Bill Vison
 *
 */
public interface StockPerformanceDao extends GenericDao  {

	/**
	 * 
	 * @param entities
	 * @throws DataAccessException
	 */
	public void saveAll(Collection<StockPerformance>  entities) throws DataAccessException;

	/**
	 * 
	 * @param entities
	 * @throws DataAccessException
	 */
	public void addAll(Collection<StockPerformance>  entities) throws DataAccessException;
	
	
	/**
	 * 
	 * @param stockCode
	 * @param publishDate
	 * @return
	 * @throws DataAccessException
	 */
	public StockPerformance getStockPerformanceByCode(String stockCode , Date publishDate) throws DataAccessException;
	
	
	/**
	 * get the list will sort by date desc
	 * @param stockCode
	 * @return
	 * @throws DataAccessException
	 */
	public List<StockPerformance> getStockPerformanceByCode(String stockCode ) throws DataAccessException;
	
}
